package rs.pnv.merchant;

import javax.jws.HandlerChain;
import javax.jws.WebService;

import rs.pnv.model.response.PaymentResponse;

@WebService(endpointInterface = "rs.pnv.merchant.Merchant")
@HandlerChain(file = "/handler-chain.xml")
public class MerchantImpl implements Merchant {

	@Override
	public String processPaymentResponse(PaymentResponse paymentResponse) {

		if (paymentResponse == null) {
			return "ERROR URL";
		}

		if (paymentResponse.getResult()) {
			return "success URL";
		}

		return "failed url";
	}

}
